package com.thjk.bdf.preloan.web.exception;

import org.apache.log4j.Logger;
import org.springframework.boot.web.servlet.error.ErrorController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 404错误处理
 * @author Sonny
 *
 */
@Controller
public class ErrorPageController implements ErrorController{
	private   Logger logger = Logger.getLogger(this.getClass());
	private static final String ERROR_PATH = "/error";
    
    @RequestMapping(ERROR_PATH)
    public String error(){
    	logger.info("统一异常处理：返回404错误页面");
        return "common/error";
    }
    @Override
    public String getErrorPath() {
        return ERROR_PATH;
    }
}
